package utils;


public class base64Coder {

    private static java.util.Base64 Base64;
    //加密

    static public String Encoder(String str)
    {
        byte[] encode = Base64.getEncoder().encode(str.getBytes());
        return new String(encode);
    }

    static public String Decoder(String str)
    {
        byte[] decode = Base64.getDecoder().decode(str.getBytes());
        return new String(decode);
    }

    public static void main(String[] args) {
        System.out.println(Decoder(Encoder("hello,,,,")));
    }

}
